<template>
  <h2 style="text-align: center;">登录</h2>
  <div style="width: 1000px;" >
     <el-form :model="form" label-width="auto" style="text-align: center;margin-left: 260px;margin-top: 100px;">
        <el-form-item label="用户名">
            <el-input v-model="form.name"  style="width: 400px;"/>
        </el-form-item>
        <el-form-item label="密码">
            <el-input v-model="form.pass" show-password  style="width: 400px;"/>
        </el-form-item>
        <el-button type="success" @click="router.push({ name: 'MainView' })">登录</el-button>
    </el-form>
  </div>
   
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router';
import axios from 'axios';
import { reactive, ref, onMounted } from 'vue'
const router = useRouter()
const form = reactive({
    name: "",
    pass: ""
})
const ct = () => {
    router.push({ name: 'MainView' })
}
</script>